//
//  NSData+Additions.h
//

#import <Foundation/Foundation.h>

@interface NSData (Additions)

- (NSString *)description;

// startOffset may be negative, indicating offset from end of data
- (NSString *)descriptionFromOffset:(int)startOffset;
- (NSString *)descriptionFromOffset:(int)startOffset limitingToByteCount:(unsigned int)maxBytes;

- (NSData *)md5Digest;
- (NSData *)sha1Digest;
- (NSString *)hexStringValue;

- (NSString *)base64Encoded;
- (NSData *)base64Decoded;

@end

@interface NSMutableData (Additions)

- (void) appendUTF8String:(NSString *) string;
- (void) appendUTF8Format:(NSString *) format, ...;

@end
